home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Menus.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  15.6 KB  |  584 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Menus.a
  3. ;
  4. ;    Contains:    Menu Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1985-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  19. __MENUS__ SET 1
  20.  
  21.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  22.     include 'ConditionalMacros.a'
  23.     ENDIF
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  28.     include 'Quickdraw.a'
  29.     ENDIF
  30.  
  31.  
  32. noMark                            EQU        0                    ;mark symbol for MarkItem
  33.  
  34.                                                             ; menu defProc messages 
  35. mDrawMsg                        EQU        0
  36. mChooseMsg                        EQU        1
  37. mSizeMsg                        EQU        2
  38. mDrawItemMsg                    EQU        4
  39. mCalcItemMsg                    EQU        5
  40.  
  41. textMenuProc                    EQU        0
  42. hMenuCmd                        EQU        27                    ;itemCmd == 0x001B ==> hierarchical menu
  43. hierMenu                        EQU        -1                    ;a hierarchical menu - for InsertMenu call
  44. mPopUpMsg                        EQU        3                    ;menu defProc messages - place yourself
  45. mctAllItems                        EQU        -98                    ;search for all Items for the given ID
  46. mctLastIDIndic                    EQU        -99                    ;last color table entry has this in ID field
  47.  
  48. MenuInfo                RECORD 0
  49. menuID                     ds.w    1                ; offset: $0 (0)
  50. menuWidth                 ds.w    1                ; offset: $2 (2)
  51. menuHeight                 ds.w    1                ; offset: $4 (4)
  52. menuProc                 ds.l    1                ; offset: $6 (6)
  53. enableFlags                 ds.l    1                ; offset: $A (10)
  54. menuData                 ds        Str255            ; offset: $E (14)
  55. sizeof                     EQU *                    ; size:   $10E (270)
  56.                         ENDR
  57. ; typedef struct MenuInfo *                MenuPtr
  58.  
  59. ; typedef MenuPtr *                        MenuHandle
  60.  
  61. ;  MenuRef is obsolete.  Use MenuHandle. 
  62. ; typedef MenuHandle                     MenuRef
  63.  
  64. MCEntry                    RECORD 0
  65. mctID                     ds.w    1                ; offset: $0 (0)        ; menu ID.  ID = 0 is the menu bar
  66. mctItem                     ds.w    1                ; offset: $2 (2)        ; menu Item. Item = 0 is a title
  67. mctRGB1                     ds        RGBColor        ; offset: $4 (4)        ; usage depends on ID and Item
  68. mctRGB2                     ds        RGBColor        ; offset: $A (10)        ; usage depends on ID and Item
  69. mctRGB3                     ds        RGBColor        ; offset: $10 (16)        ; usage depends on ID and Item
  70. mctRGB4                     ds        RGBColor        ; offset: $16 (22)        ; usage depends on ID and Item
  71. mctReserved                 ds.w    1                ; offset: $1C (28)        ; reserved for internal use
  72. sizeof                     EQU *                    ; size:   $1E (30)
  73.                         ENDR
  74. ; typedef struct MCEntry *                MCEntryPtr
  75.  
  76. MCTable                    RECORD 0
  77. elements                 ds.b    1 * MCEntry.sizeof
  78. sizeof                     EQU *                    ; size:   $1E (30)
  79.                         ENDR
  80.  
  81.  
  82. ; typedef struct MCEntry *                MCTablePtr
  83.  
  84. ; typedef MCTablePtr *                    MCTableHandle
  85.  
  86. MenuCRsrc                RECORD 0
  87. numEntries                 ds.w    1                ; offset: $0 (0)        ; number of entries
  88. mcEntryRecs                 ds        MCTable            ; offset: $2 (2)        ; ARRAY [1..numEntries] of MCEntry
  89. sizeof                     EQU *                    ; size:   $20 (32)
  90.                         ENDR
  91. ; typedef struct MenuCRsrc *            MenuCRsrcPtr
  92.  
  93. ; typedef MenuCRsrcPtr *                MenuCRsrcHandle
  94.  
  95.  
  96.  
  97.  
  98. ;
  99. ; pascal short GetMBarHeight(void)
  100. ;
  101.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  102.         Macro
  103.         _GetMBarHeight        &dest=(sp)
  104.             move.w            $0BAA,&dest
  105.         EndM
  106.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  107.         IMPORT_CFM_FUNCTION GetMBarHeight
  108.     ENDIF
  109.  
  110. ;
  111. ; pascal void InitMenus(void )
  112. ;
  113.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  114.         _InitMenus:    OPWORD    $A930
  115.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  116.         IMPORT_CFM_FUNCTION InitMenus
  117.     ENDIF
  118.  
  119. ;
  120. ; pascal MenuHandle NewMenu(short menuID, ConstStr255Param menuTitle)
  121. ;
  122.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  123.         _NewMenu:    OPWORD    $A931
  124.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  125.         IMPORT_CFM_FUNCTION NewMenu
  126.     ENDIF
  127.  
  128. ;
  129. ; pascal MenuHandle GetMenu(short resourceID)
  130. ;
  131.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  132.         _GetMenu:    OPWORD    $A9BF
  133.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  134.         IMPORT_CFM_FUNCTION GetMenu
  135.     ENDIF
  136.  
  137. ;
  138. ; pascal void DisposeMenu(MenuHandle theMenu)
  139. ;
  140.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  141.         _DisposeMenu:    OPWORD    $A932
  142.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  143.         IMPORT_CFM_FUNCTION DisposeMenu
  144.     ENDIF
  145.  
  146. ;
  147. ; pascal void AppendMenu(MenuHandle menu, ConstStr255Param data)
  148. ;
  149.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  150.         _AppendMenu:    OPWORD    $A933
  151.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  152.         IMPORT_CFM_FUNCTION AppendMenu
  153.     ENDIF
  154.  
  155. ;
  156. ; pascal void InsertResMenu(MenuHandle theMenu, ResType theType, short afterItem)
  157. ;
  158.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  159.         _InsertResMenu:    OPWORD    $A951
  160.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  161.         IMPORT_CFM_FUNCTION InsertResMenu
  162.     ENDIF
  163.  
  164. ;
  165. ; pascal void InsertMenu(MenuHandle theMenu, short beforeID)
  166. ;
  167.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  168.         _InsertMenu:    OPWORD    $A935
  169.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  170.         IMPORT_CFM_FUNCTION InsertMenu
  171.     ENDIF
  172.  
  173. ;
  174. ; pascal void DeleteMenu(short menuID)
  175. ;
  176.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  177.         _DeleteMenu:    OPWORD    $A936
  178.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  179.         IMPORT_CFM_FUNCTION DeleteMenu
  180.     ENDIF
  181.  
  182. ;
  183. ; pascal void AppendResMenu(MenuHandle theMenu, ResType theType)
  184. ;
  185.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  186.         _AppendResMenu:    OPWORD    $A94D
  187.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  188.         IMPORT_CFM_FUNCTION AppendResMenu
  189.     ENDIF
  190.  
  191. ;
  192. ; pascal void InsertMenuItem(MenuHandle theMenu, ConstStr255Param itemString, short afterItem)
  193. ;
  194.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  195.         _InsertMenuItem:    OPWORD    $A826
  196.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  197.         IMPORT_CFM_FUNCTION InsertMenuItem
  198.     ENDIF
  199.  
  200. ;
  201. ; pascal void DeleteMenuItem(MenuHandle theMenu, short item)
  202. ;
  203.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  204.         _DeleteMenuItem:    OPWORD    $A952
  205.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  206.         IMPORT_CFM_FUNCTION DeleteMenuItem
  207.     ENDIF
  208.  
  209. ;
  210. ; pascal long MenuKey(CharParameter ch)
  211. ;
  212.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  213.         _MenuKey:    OPWORD    $A93E
  214.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  215.         IMPORT_CFM_FUNCTION MenuKey
  216.     ENDIF
  217.  
  218. ;
  219. ; pascal void HiliteMenu(short menuID)
  220. ;
  221.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  222.         _HiliteMenu:    OPWORD    $A938
  223.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  224.         IMPORT_CFM_FUNCTION HiliteMenu
  225.     ENDIF
  226.  
  227. ;
  228. ; pascal void SetMenuItemText(MenuHandle theMenu, short item, ConstStr255Param itemString)
  229. ;
  230.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  231.         _SetMenuItemText:    OPWORD    $A947
  232.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  233.         IMPORT_CFM_FUNCTION SetMenuItemText
  234.     ENDIF
  235.  
  236. ;
  237. ; pascal void GetMenuItemText(MenuHandle theMenu, short item, Str255 itemString)
  238. ;
  239.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  240.         _GetMenuItemText:    OPWORD    $A946
  241.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  242.         IMPORT_CFM_FUNCTION GetMenuItemText
  243.     ENDIF
  244.  
  245. ;
  246. ; pascal void SetItemMark(MenuHandle theMenu, short item, CharParameter markChar)
  247. ;
  248.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  249.         _SetItemMark:    OPWORD    $A944
  250.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  251.         IMPORT_CFM_FUNCTION SetItemMark
  252.     ENDIF
  253.  
  254. ;
  255. ; pascal void GetItemMark(MenuHandle theMenu, short item, CharParameter *markChar)
  256. ;
  257.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  258.         _GetItemMark:    OPWORD    $A943
  259.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  260.         IMPORT_CFM_FUNCTION GetItemMark
  261.     ENDIF
  262.  
  263. ;
  264. ; pascal void SetItemCmd(MenuHandle theMenu, short item, CharParameter cmdChar)
  265. ;
  266.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  267.         _SetItemCmd:    OPWORD    $A84F
  268.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  269.         IMPORT_CFM_FUNCTION SetItemCmd
  270.     ENDIF
  271.  
  272. ;
  273. ; pascal void GetItemCmd(MenuHandle theMenu, short item, CharParameter *cmdChar)
  274. ;
  275.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  276.         _GetItemCmd:    OPWORD    $A84E
  277.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  278.         IMPORT_CFM_FUNCTION GetItemCmd
  279.     ENDIF
  280.  
  281. ;
  282. ; pascal void SetItemIcon(MenuHandle theMenu, short item, short iconIndex)
  283. ;
  284.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  285.         _SetItemIcon:    OPWORD    $A940
  286.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  287.         IMPORT_CFM_FUNCTION SetItemIcon
  288.     ENDIF
  289.  
  290. ;
  291. ; pascal void GetItemIcon(MenuHandle theMenu, short item, short *iconIndex)
  292. ;
  293.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  294.         _GetItemIcon:    OPWORD    $A93F
  295.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  296.         IMPORT_CFM_FUNCTION GetItemIcon
  297.     ENDIF
  298.  
  299. ;
  300. ; pascal void SetItemStyle(MenuHandle theMenu, short item, StyleParameter chStyle)
  301. ;
  302.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  303.         _SetItemStyle:    OPWORD    $A942
  304.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  305.         IMPORT_CFM_FUNCTION SetItemStyle
  306.     ENDIF
  307.  
  308. ;
  309. ; pascal void GetItemStyle(MenuHandle theMenu, short item, Style *chStyle)
  310. ;
  311.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  312.         _GetItemStyle:    OPWORD    $A941
  313.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  314.         IMPORT_CFM_FUNCTION GetItemStyle
  315.     ENDIF
  316.  
  317. ;
  318. ; pascal MenuHandle GetMenuHandle(short menuID)
  319. ;
  320.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  321.         _GetMenuHandle:    OPWORD    $A949
  322.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  323.         IMPORT_CFM_FUNCTION GetMenuHandle
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal void CalcMenuSize(MenuHandle theMenu)
  328. ;
  329.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  330.         _CalcMenuSize:    OPWORD    $A948
  331.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  332.         IMPORT_CFM_FUNCTION CalcMenuSize
  333.     ENDIF
  334.  
  335. ;
  336. ; pascal void DisableItem(MenuHandle theMenu, short item)
  337. ;
  338.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  339.         _DisableItem:    OPWORD    $A93A
  340.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  341.         IMPORT_CFM_FUNCTION DisableItem
  342.     ENDIF
  343.  
  344. ;
  345. ; pascal void EnableItem(MenuHandle theMenu, short item)
  346. ;
  347.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  348.         _EnableItem:    OPWORD    $A939
  349.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  350.         IMPORT_CFM_FUNCTION EnableItem
  351.     ENDIF
  352.  
  353. ;
  354. ; pascal void FlashMenuBar(short menuID)
  355. ;
  356.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  357.         _FlashMenuBar:    OPWORD    $A94C
  358.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  359.         IMPORT_CFM_FUNCTION FlashMenuBar
  360.     ENDIF
  361.  
  362. ;
  363. ; pascal long PopUpMenuSelect(MenuHandle menu, short top, short left, short popUpItem)
  364. ;
  365.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  366.         _PopUpMenuSelect:    OPWORD    $A80B
  367.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  368.         IMPORT_CFM_FUNCTION PopUpMenuSelect
  369.     ENDIF
  370.  
  371. ;
  372. ; pascal long MenuChoice(void )
  373. ;
  374.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  375.         _MenuChoice:    OPWORD    $AA66
  376.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  377.         IMPORT_CFM_FUNCTION MenuChoice
  378.     ENDIF
  379.  
  380. ;
  381. ; pascal void DeleteMCEntries(short menuID, short menuItem)
  382. ;
  383.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  384.         _DeleteMCEntries:    OPWORD    $AA60
  385.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  386.         IMPORT_CFM_FUNCTION DeleteMCEntries
  387.     ENDIF
  388.  
  389. ;
  390. ; pascal MCTableHandle GetMCInfo(void )
  391. ;
  392.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  393.         _GetMCInfo:    OPWORD    $AA61
  394.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  395.         IMPORT_CFM_FUNCTION GetMCInfo
  396.     ENDIF
  397.  
  398. ;
  399. ; pascal void SetMCInfo(MCTableHandle menuCTbl)
  400. ;
  401.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  402.         _SetMCInfo:    OPWORD    $AA62
  403.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  404.         IMPORT_CFM_FUNCTION SetMCInfo
  405.     ENDIF
  406.  
  407. ;
  408. ; pascal void DisposeMCInfo(MCTableHandle menuCTbl)
  409. ;
  410.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  411.         _DisposeMCInfo:    OPWORD    $AA63
  412.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  413.         IMPORT_CFM_FUNCTION DisposeMCInfo
  414.     ENDIF
  415.  
  416. ;
  417. ; pascal MCEntryPtr GetMCEntry(short menuID, short menuItem)
  418. ;
  419.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  420.         _GetMCEntry:    OPWORD    $AA64
  421.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  422.         IMPORT_CFM_FUNCTION GetMCEntry
  423.     ENDIF
  424.  
  425. ;
  426. ; pascal void SetMCEntries(short numEntries, MCTablePtr menuCEntries)
  427. ;
  428.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  429.         _SetMCEntries:    OPWORD    $AA65
  430.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  431.         IMPORT_CFM_FUNCTION SetMCEntries
  432.     ENDIF
  433.  
  434. ;
  435. ; pascal void DrawMenuBar(void )
  436. ;
  437.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  438.         _DrawMenuBar:    OPWORD    $A937
  439.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  440.         IMPORT_CFM_FUNCTION DrawMenuBar
  441.     ENDIF
  442.  
  443. ;
  444. ; pascal void InvalMenuBar(void )
  445. ;
  446.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  447.         _InvalMenuBar:    OPWORD    $A81D
  448.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  449.         IMPORT_CFM_FUNCTION InvalMenuBar
  450.     ENDIF
  451.  
  452. ;
  453. ; pascal void InitProcMenu(short resID)
  454. ;
  455.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  456.         _InitProcMenu:    OPWORD    $A808
  457.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  458.         IMPORT_CFM_FUNCTION InitProcMenu
  459.     ENDIF
  460.  
  461. ;
  462. ; pascal Handle GetMenuBar(void )
  463. ;
  464.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  465.         _GetMenuBar:    OPWORD    $A93B
  466.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  467.         IMPORT_CFM_FUNCTION GetMenuBar
  468.     ENDIF
  469.  
  470. ;
  471. ; pascal void SetMenuBar(Handle menuList)
  472. ;
  473.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  474.         _SetMenuBar:    OPWORD    $A93C
  475.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  476.         IMPORT_CFM_FUNCTION SetMenuBar
  477.     ENDIF
  478.  
  479. ;
  480. ; pascal Boolean SystemEdit(short editCmd)
  481. ;
  482.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  483.         _SystemEdit:    OPWORD    $A9C2
  484.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  485.         IMPORT_CFM_FUNCTION SystemEdit
  486.     ENDIF
  487.  
  488. ;
  489. ; pascal void SystemMenu(long menuResult)
  490. ;
  491.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  492.         _SystemMenu:    OPWORD    $A9B5
  493.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  494.         IMPORT_CFM_FUNCTION SystemMenu
  495.     ENDIF
  496.  
  497. ;
  498. ; pascal Handle GetNewMBar(short menuBarID)
  499. ;
  500.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  501.         _GetNewMBar:    OPWORD    $A9C0
  502.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  503.         IMPORT_CFM_FUNCTION GetNewMBar
  504.     ENDIF
  505.  
  506. ;
  507. ; pascal void ClearMenuBar(void )
  508. ;
  509.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  510.         _ClearMenuBar:    OPWORD    $A934
  511.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  512.         IMPORT_CFM_FUNCTION ClearMenuBar
  513.     ENDIF
  514.  
  515. ;
  516. ; pascal void CheckItem(MenuHandle theMenu, short item, Boolean checked)
  517. ;
  518.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  519.         _CheckItem:    OPWORD    $A945
  520.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  521.         IMPORT_CFM_FUNCTION CheckItem
  522.     ENDIF
  523.  
  524. ;
  525. ; pascal short CountMItems(MenuHandle theMenu)
  526. ;
  527.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  528.         _CountMItems:    OPWORD    $A950
  529.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  530.         IMPORT_CFM_FUNCTION CountMItems
  531.     ENDIF
  532.  
  533. ;
  534. ; pascal void SetMenuFlash(short count)
  535. ;
  536.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  537.         _SetMenuFlash:    OPWORD    $A94A
  538.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  539.         IMPORT_CFM_FUNCTION SetMenuFlash
  540.     ENDIF
  541.  
  542. ;
  543. ; pascal long MenuSelect(Point startPt)
  544. ;
  545.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  546.         _MenuSelect:    OPWORD    $A93D
  547.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  548.         IMPORT_CFM_FUNCTION MenuSelect
  549.     ENDIF
  550.  
  551. ;
  552. ; pascal void InsertFontResMenu(MenuHandle theMenu, short afterItem, short scriptFilter)
  553. ;
  554.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  555.         Macro
  556.         _InsertFontResMenu
  557.             move.w              #$0400,D0
  558.             dc.w                $A825
  559.         EndM
  560.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  561.         IMPORT_CFM_FUNCTION InsertFontResMenu
  562.     ENDIF
  563.  
  564. ;
  565. ; pascal void InsertIntlResMenu(MenuHandle theMenu, ResType theType, short afterItem, short scriptFilter)
  566. ;
  567.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  568.         Macro
  569.         _InsertIntlResMenu
  570.             move.w              #$0601,D0
  571.             dc.w                $A825
  572.         EndM
  573.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  574.         IMPORT_CFM_FUNCTION InsertIntlResMenu
  575.     ENDIF
  576.  
  577.  
  578.  
  579.     IF OLDROUTINENAMES THEN
  580.     ENDIF    ; OLDROUTINENAMES
  581.  
  582.     ENDIF ; __MENUS__ 
  583.  
  584.